/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.mzk.kramerius4.resolver;

import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author Martin Řehánek <rehan at mzk.cz>
 */
public class Redirector extends HttpServlet {

    void redirectToK4(HttpServletRequest request, HttpServletResponse response, String uuid) throws IOException, ServletException {
        ServletContext sc = null;
        sc = getServletContext().getContext("/search");
        RequestDispatcher rd = sc.getRequestDispatcher("/handle/uuid:" + uuid);
        rd.forward(request, response);
    }
}
